package com.dang.service.imp;

import java.util.List;

import com.dang.dao.imp.DAOFactory;
import com.dang.model.Book;
import com.dang.model.Product;
import com.dang.service.ProductService;


public class ProductServiceImp implements ProductService{

	@Override
	public Book findById(int id) throws Exception{
		return DAOFactory.getProductDAO().findById(id);
	}
	@Override
	public List<Product> findByHot(int hot) throws Exception{
		return DAOFactory.getProductDAO().findByHot(hot);
	}
	@Override
	public List<Product> findByNew(int news) throws Exception{
		return DAOFactory.getProductDAO().findByNew(news);
	}
}
